|
|
|
| TABLE 1.1.CONTINUED | | Property | ValueOrientation Vertical or Horizontal | | | | Name | prgStatus | | Visible | False | | Orientation | Vertical or Horizontal | | Scrolling | Smooth or Standard | | | | Name | lblDisplay | | Caption | Leave blank | | | | Name | cmdQuit | | Caption | Quit | | | | Name | cmdCopy | | Caption | File Copy |
|
|
|
|
|
|
To get the code to copy the file while your application executes other commands, use the Get and Put file statements to read data from the source file and write it to the destination file. Both files will be opened by using the Binary option of the Open file statement. Only two events need code in this application: |
|
|
|
|
|
|
|
|
For the cmdQuit_Click event, you need only the command END to finish the execution of the application. |
|
|
|
|
|
|
|
|
For the cmdCopy_Click event, add the code in Listing 1.1 to perform all the necessary tasks. |
|
|
|
|
|
|
|
|
LISTING 1.1FRMFILECOPY.TXTTHE FILE-COPY ROUTINE USED TO COPY A FILE WITHIN AN APPLICATION. |
|
|
|
 |
|
|
|
|
1: Private Sub cmdCopy_Click()
2: Dim lngFileSize As Long
3: Dim intLoopCtr As Integer
4: Dim intBufferCount As Integer
5: Dim strInByte As String * 256
6: Dim strFrom_filename As String
7: Dim strTo_filename As String
8: Dim strAvi_Filename As String
|
|
|
|
|
|